package io.wins.vertx.verticle.api;

import io.vertx.core.Handler;
import io.vertx.core.eventbus.Message;
import io.vertx.core.eventbus.MessageConsumer;
import io.wins.vertx.verticle.BaseVerticle;

public class RestApiVerticle extends BaseVerticle {

    public static final String CREATE = "create";
    public static final String UPDATE = "update";
    public static final String DELETE = "delete";
    public static final String LIST = "list";
    public static final String LOAD = "load";

    protected <T> MessageConsumer<T> on(final String address, final Handler<Message<T>> handler) {
        return this.vertx.eventBus().consumer(address, handler);
    }
}
